const fs = require('fs');
const archiver = require('archiver');
const path = require("path")

const path_ = path.resolve(__dirname, "../extension")

const output = fs.createWriteStream(path.resolve(__dirname, "../extension.zip"));
const archive = archiver('zip');

archive.on('error', function (err) {
	throw err;
});

archive.pipe(output);
// 文件夹压缩
archive.directory(path_, false);
// 文件压缩
// archive.file('test.js');

archive.finalize();
